﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Zocono.WCS.Admin.Models.Equipment
{
    public class EquipmentLayoutPageData
    {
        public string ID { get; set; }
        public string AreaCode { get; set; }
        /// <summary>
        /// 堆垛机、货架单元格数
        /// </summary>
        public int ColumnCount { get; set; }
        public string DefaultColor { get; set; }
        /// <summary>
        /// 方向 对应枚举 EnumEquipmentDirection
        /// </summary>
        public int Direction { get; set; }
        public long EquipmentID { get; set; }
        /// <summary>
        /// 调度设备的设备编号和设备布局编号一致
        /// </summary>
        public string EquipmentLayoutCode { get; set; }
        public long EquipmentLayoutTypeID { get; set; }
        public int PointX { get; set; }
        public int PointY { get; set; }
        public int SizeHeigth { get; set; }
        public int SizeWidth { get; set; }
        [Required(AllowEmptyStrings = true)]
        public string EquipmentName { get; set; }
        [Required(AllowEmptyStrings = true)]
        public string EquipmentLayoutTypeName { get; set; }
        [Required(AllowEmptyStrings = true)]
        public string DirectionDescirption { get; set; }
        //调度设备列表
        public List<EquipmentPage> DispatchEquipments { get; set; }
        //设备布局类型列表
        public List<EquipmentLayoutTypePage> EquipmentLayoutTypes { get; set; }

        public List<EquipmentDirectionPage> EquipmentDirections { get; set; }
    }

    public class EquipmentPageData
    {
        public long ID { get; set; }
        public string Js_Id { get { return ID.ToString(); } }
        /// <summary>
        /// 区域号，X+取值范围(0-F)
        /// </summary>
        public string AreaCode { get; set; }
        public string EquipmentCode { get; set; }
        public string EquipmentName { get; set; }
        public long EquipmentTypeID { get; set; }
        /// <summary>
        /// 工位数量，默认1，双工位堆垛机为2
        /// </summary>
        public int StationCount { get; set; }
        [Required(AllowEmptyStrings = true)]
        public string EquipmentTypeName { get; set; }

        public List<EquipmentTypePage> EquipmentTypes { get; set; }
    }

    public class EquipmentLayoutTypePageData
    {
        public long ID { get; set; }
        public string Js_Id { get { return ID.ToString(); } }
        public long EquipmentTypeID { get; set; }
        public string TypeCode { get; set; }
        public string TypeName { get; set; }
        [Required(AllowEmptyStrings = true)]
        public string EquipmentTypeName { get; set; }
        public List<EquipmentTypePage> EquipmentTypes { get; set; }
    }

    public class EquipmentTypePage
    {
        public string ID { get; set; }

        public string TypeName { get; set; }
    }

    public class EquipmentPage
    {
        public string EquipmentID { get; set; }
        public string EquipmentName { get; set; }
    }

    public class EquipmentLayoutTypePage
    {

        public string EquipmentLayoutTypeID { get; set; }
        public string EquipmentLayoutTypeName { get; set; }
    }

    public class EquipmentDirectionPage
    {
        public int ID { get; set; }

        public string Desception { get; set; }
    }
}
